package com.py.warehouse.mapper;

import com.py.warehouse.domain.BsWarehouse;
import com.py.warehouse.domain.Product;
import com.py.warehouse.domain.WhCheckDetails;
import com.py.warehouse.domain.WhInventory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 仓库列表Mapper接口
 * 
 * @author ruoyi
 * @date 2024-11-25
 */
public interface WhInventoryMapper
{
    /**
     * 查找库位里面的商品数量
     * @param locationCode
     * @return
     */
    Integer selectWhInventoryByWarehouseCode(String locationCode);

    /**
     * 查找库存商品
     * @param warehouseCode
     * @return
     */
    List<Product> selectProductByWarehouseCode(@Param("warehouseCode") String warehouseCode,
                                               @Param("productName") String productName,
                                               @Param("productUnit") Integer integer);

    /**
     * 查询商品库存
     * @param whInventory
     * @return
     */
    Integer selectInventory(WhInventory whInventory);

    /**
     * 增加未出入库数量
     * @param whCheckDetails
     * @return
     */
    int updatePendingInNum(WhCheckDetails whCheckDetails);

    /**
     * 减少未出入库数量
     * @param whCheckDetails
     * @return
     */
    int updatePendingInNumJian(WhCheckDetails whCheckDetails);

    /**
     * 修改库存数量和库存金额
     * @param whCheckDetails
     * @return
     */
    int updateCurrenInventory(WhCheckDetails whCheckDetails);

    WhInventory selectInventoryById(String id);
}
